package com.commons.base.model;

import java.io.Serializable;

/**
 * 返回码
 * 
 * @author xkq
 * @date 2018年8月3日
 */

public enum ResultCode implements Serializable{
	/*** 0开头的code 系统用的(通用的)
	 * code定义的时候 以1000递增*/
	success("0000","成功"),
	/*** 未知异常的返回网络错误*/
	unknown_error("0001","网络错误"),
	data_not_find("0002","数据不存在"),
	/*** 分布式锁获取不到数据返回*/
	distributedLock_timeOut("0003","请求超时，请稍后重试"),
	notLogin("0004","未登录，请登录"),
	_404("0005","url错误，接口不存在"),
	verifyParam("0006","接口参数格式不正确"),
	verifyUniqueness("0007","值已经存在"),
	isNull("0008","查无数据"),
	isNotNull("0009","已有数据"),
	headerError("0010","header参数异常"),
	unAuth("0011","无接口访问权限"),
	dataFindDelFail("0012","已有数据删除失败"),
	reqeust_TimeOut("0013","请求超时，请稍后重试"),
	/***验证码****************/
	frequencyLimit("0013","频率限制"),
	verifyValError("0014","值错误"),
	;
	
	private String code;
	private String message;
	/**
	 * code
	 *
	 * @return  the code
	 */
	
	public String getCode() {
		return code;
	}
	
	/**
	 * @param code the code to set
	 */
	
	public void setCode(String code) {
		this.code = code;
	}
	
	/**
	 * msg
	 *
	 * @return  the msg
	 */
	
	public String getMessage() {
		return message;
	}
	
	/**
	 * @param msg the msg to set
	 */
	
	public void setMsg(String message) {
		this.message = message;
	}
	ResultCode(String code,String message) {
		this.code = code;
		this.message = message;
	};
}
